package Tests;

import static org.junit.Assert.*;
import junit.framework.Assert;

import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;

import server.DB;
import server.ServerWindow;

public class TestUserLoginUserExist {

	DB db;
	String Except_Str=null;
	String Result_Str=null;
	String[] arr;
	ServerWindow sv;
	
	@BeforeClass
	public static void setUpBeforeClass() throws Exception {
	}

	@AfterClass
	public static void tearDownAfterClass() throws Exception {
	}

	@Before
	public void setUp() throws Exception {
		sv.arr[4]="localhost";
		sv.arr[1]="root";
		sv.arr[2]="Braude";
		String[] arr = new String[5];
		arr[0]="login";
		arr[1]="employeedb";
		arr[2]="rami levi";
		arr[3]="9876";
		db=new DB(arr);
	}

	@After
	public void tearDown() throws Exception {
	}

	@Test
	public void TestLoginPUserExist() {
		
		Except_Str="user dosent exists";
		Result_Str=db.login();
		
		Assert.assertEquals(Except_Str,Result_Str);
	}

}
